﻿
using Irony.Compiler;

namespace IronLua.Ast {

	public class LocalFunctionStatement : FunctionStatement {

		public override LuaNodeType NodeType {
			get { return LuaNodeType.LocalFunctionStatement; }
		}

		public LocalFunctionStatement (CompilerContext context, NonTerminal nonTerminal, SourceLocation location, AstNodeList childNodes)
			: base (context, nonTerminal, location, childNodes, childNodes [2].ToExpression ())
		{
		}

		public override void Accept (ILuaAstVisitor visitor)
		{
			visitor.VisitLocalFunctionStatement (this);
		}
	}
}
